#ifndef __PNN_DEFINE__H
#define __PNN_DEFINE__H

#include "log.h"

#define UP_DIV(x, y) (((x) + (y) - (1)) / (y))

#ifdef Debug
#include <cassert>
#define PanNN_ASSERT(f) assert(f)
#else
#define PanNN_ASSERT(f) ((void)0)
#endif

#define ERR_CHECK(flag, ret)                    \
    do {                                        \
        if (!(flag)) {                          \
            PNN_LOG(ERROR) << "ERR CHECK Fail"; \
            return (ret);                       \
        }                                       \
    } while (0)

#endif
